package com.health.api.client;


import com.health.api.config.DefaultFeignConfig;
import com.health.api.model.hospital.GetHospitalInfoRequest;
import com.health.api.model.hospital.HospitalVO;
import com.health.common.model.user.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zhexueqi
 * @ClassName UserClient
 * @since 2024/5/12    20:58
 */
@FeignClient(value = "user-service" ,configuration= {DefaultFeignConfig.class})
public interface UserClient {

    /**
     * 根据用户名和密码获取用户信息
     */
    @GetMapping(value = "/users/info")
    LoginUser getUserInfoByUserAccountAndUserPassword(@RequestParam("userAccount") String userAccount, @RequestParam("userPassword") String userPassword, @RequestParam("userRole")  Integer userRole);

    @GetMapping(value = "/users/roleList",consumes = "application/json;charset=utf-8",produces = "application/json")
    List<String> getRoleList(@RequestParam("loginId")Long loginId);

    @PostMapping(value = "/users/getHospitalInfo",consumes = "application/json;charset=utf-8",produces = "application/json")
    HospitalVO getHospitalInfo(@RequestBody GetHospitalInfoRequest getHospitalInfoRequest);


}
